package com.hspedu.poly_.polyparameter;

import java.lang.annotation.ElementType;

//普通员工
public class Ordinary extends Employee {
   private String work;

   //特有类：工作
    public void work(){
        System.out.println("普通员工" + getName() + "正在工作..");
    }

    public Ordinary(String name, double salary, String work) {
        super(name, salary);
        this.work = work;
    }

    public String getWork() {
        return work;
    }

    public void setWork(String work) {
        this.work = work;
    }

    @Override
    public String getAnnual() {
        return "普通员工"+super.getAnnual() + "\n工作:"+ work;
    }


}
